Optimal. Leaf size=26 \[ -\frac{a \tanh ^{-1}(\cos (c+d x))}{d}-\frac{b \cos (c+d x)}{d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0248953, antiderivative size = 26, normalized size of antiderivative = 1., number of steps used = 2, number of rules used = 2, integrand size = 19, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.105, Rules used = {3014, 3770} \[ -\frac{a \tanh ^{-1}(\cos (c+d x))}{d}-\frac{b \cos (c+d x)}{d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3014
Rule 3770
Rubi steps
\begin{align*} \int \csc (c+d x) \left (a+b \sin ^2(c+d x)\right ) \, dx &=-\frac{b \cos (c+d x)}{d}+a \int \csc (c+d x) \, dx\\ &=-\frac{a \tanh ^{-1}(\cos (c+d x))}{d}-\frac{b \cos (c+d x)}{d}\\ \end{align*}
Mathematica [B] time = 0.0319162, size = 63, normalized size = 2.42 \[ \frac{a \log \left (\sin \left (\frac{c}{2}+\frac{d x}{2}\right )\right )}{d}-\frac{a \log \left (\cos \left (\frac{c}{2}+\frac{d x}{2}\right )\right )}{d}+\frac{b \sin (c) \sin (d x)}{d}-\frac{b \cos (c) \cos (d x)}{d} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.046, size = 35, normalized size = 1.4 \begin{align*} -{\frac{b\cos \left ( dx+c \right ) }{d}}+{\frac{a\ln \left ( \csc \left ( dx+c \right ) -\cot \left ( dx+c \right ) \right ) }{d}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 0.94894, size = 51, normalized size = 1.96 \begin{align*} -\frac{2 \, b \cos \left (d x + c\right ) + a \log \left (\cos \left (d x + c\right ) + 1\right ) - a \log \left (\cos \left (d x + c\right ) - 1\right )}{2 \, d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 1.73244, size = 124, normalized size = 4.77 \begin{align*} -\frac{2 \, b \cos \left (d x + c\right ) + a \log \left (\frac{1}{2} \, \cos \left (d x + c\right ) + \frac{1}{2}\right ) - a \log \left (-\frac{1}{2} \, \cos \left (d x + c\right ) + \frac{1}{2}\right )}{2 \, d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \left (a + b \sin ^{2}{\left (c + d x \right )}\right ) \csc{\left (c + d x \right )}\, dx \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] time = 1.15154, size = 78, normalized size = 3. \begin{align*} \frac{a \log \left (\frac{{\left | -\cos \left (d x + c\right ) + 1 \right |}}{{\left | \cos \left (d x + c\right ) + 1 \right |}}\right ) + \frac{4 \, b}{\frac{\cos \left (d x + c\right ) - 1}{\cos \left (d x + c\right ) + 1} - 1}}{2 \, d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]